﻿using System;
using System.Collections.Generic;

namespace CourseManagerment.Model;

public partial class User
{
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
    public User()
    {
        this.Teachers = new HashSet<Teacher>();
    }

    public int UserId { get; set; }
    public string UserName { get; set; }
    public string RealName { get; set; }
    public string Password { get; set; }
    public int IsValidation { get; set; }
    public int CanLogin { get; set; }
    public int IsTeacher { get; set; }
    public string Avatar { get; set; }
    public int Gender { get; set; }

    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
    public virtual ICollection<Teacher> Teachers { get; set; }
}


public partial class Cours
{
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
    public Cours()
    {
        this.Teachers = new HashSet<string>();
    }

    public int CourseId { get; set; }
    public string CourseName { get; set; }
    public string CourseCover { get; set; } 
    public string Description { get; set; }
    public int IsPublish { get; set; }
    public string CourseHttp { get; set; }

    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
    public virtual ICollection<string> Teachers { get; set; }
}

public partial class CourseTeacherRelation
{
    public int CourseId { get; set; }
    public int TeacherId { get; set; }
    public string CourseName { get; set; }

    public virtual Cours Cours { get; set; }
    public virtual Teacher Teacher { get; set; }
}

public partial class Platform
{
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
    public Platform()
    {
        this.PlayRecords = new HashSet<PlayRecord>();
    }
    public string CourseName { get; set; }
    public int PlatfromId { get; set; }
    public string PlatfromName { get; set; }
    public int IsValidation { get; set; }

    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
    public virtual ICollection<PlayRecord> PlayRecords { get; set; }
}
public partial class PlayRecord
{
    public int CourseId { get; set; }
    public int PlatformId { get; set; }
    public decimal PlayCount { get; set; }
    public int IsGrowing { get; set; }
    public Nullable<decimal> GrowingRato { get; set; }

    public virtual Platform Platform { get; set; }
}

public partial class Teacher
{
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
    public Teacher()
    {
        this.CourseTeacherRelations = new HashSet<CourseTeacherRelation>();
    }

    public int TeacherId { get; set; }
    public int UserId { get; set; }

    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
    public virtual ICollection<CourseTeacherRelation> CourseTeacherRelations { get; set; }
    public virtual User User { get; set; }
}
